package com.iweibo.ui;

import com.iweibo.R;

import android.os.Bundle;
import android.util.Log;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.ImageView;
import android.app.Activity;
import android.content.Intent;

public class LogoActivity extends Activity {

	private static final String TAG = "LogoActivity";

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.logo);
		ImageView imgLogo = (ImageView) findViewById(R.id.img_logo);
		AlphaAnimation animation = new AlphaAnimation(0.0f, 1.0f);
		animation.setDuration(3000);
		imgLogo.setAnimation(animation);
		animation.setAnimationListener(new Animation.AnimationListener() {

			@Override
			public void onAnimationStart(Animation animation) {
				Log.d(TAG, "动画开始...");
			}

			@Override
			public void onAnimationRepeat(Animation animation) {
				Log.d(TAG, "重播动画...");
			}

			@Override
			public void onAnimationEnd(Animation animation) {
				Intent intent = new Intent(LogoActivity.this, LoginActivity.class);
				startActivity(intent);
				Log.d(TAG, "动画结束...");
			}
		});

	}
}
